package com.bgs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bgs.utils.dateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class studentInformation {

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String stuId;

    private Integer stuNum;

    private String stuName;

    private String mobile;

    private String sex;

    private Integer age;

    private String idType;

    private String idNum;
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthday;

    private Integer deleteFlag;

    private String nativePlace;

    private String provincesId;

    private String citiesId;

    private String areasId;

    private String detailAddr;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    private String remark;

    private String province;
    private String city;
    private String area;
    private String pca;


    //宿舍名称+班级名称
    private String gradeGradeName;
    private String dormitoryDormitoryName;


    @Override
    public String toString() {
        return "studentInformation{" +
                "stuId='" + stuId + '\'' +
                ", stuNum=" + stuNum +
                ", stuName='" + stuName + '\'' +
                ", mobile='" + mobile + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", idType='" + idType + '\'' +
                ", idNum='" + idNum + '\'' +
                ", birthday=" + birthday +
                ", deleteFlag=" + deleteFlag +
                ", nativePlace='" + nativePlace + '\'' +
                ", provincesId='" + provincesId + '\'' +
                ", citiesId='" + citiesId + '\'' +
                ", areasId='" + areasId + '\'' +
                ", detailAddr='" + detailAddr + '\'' +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", remark='" + remark + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", area='" + area + '\'' +
                ", pca='" + pca + '\'' +
                ", gradeGradeName='" + gradeGradeName + '\'' +
                ", dormitoryDormitoryName='" + dormitoryDormitoryName + '\'' +
                '}';
    }

    public String getGradeGradeName() {
        return gradeGradeName;
    }

    public void setGradeGradeName(String gradeGradeName) {
        this.gradeGradeName = gradeGradeName;
    }

    public String getDormitoryDormitoryName() {
        return dormitoryDormitoryName;
    }

    public void setDormitoryDormitoryName(String dormitoryDormitoryName) {
        this.dormitoryDormitoryName = dormitoryDormitoryName;
    }

    public String getPca() {
        return getProvince()+getCity()+getArea();
    }

    public void setPca(String pca) {
        this.pca = pca;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }

    public Integer getStuNum() {
        return stuNum;
    }

    public void setStuNum(Integer stuNum) {
        this.stuNum = stuNum;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName == null ? null : stuName.trim();
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public Integer getAge() {

        Integer age1 = 0;

        try {
            age1 = dateUtils.getAge(birthday);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return age1;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType == null ? null : idType.trim();
    }

    public String getIdNum() {
        return idNum;
    }

    public void setIdNum(String idNum) {
        this.idNum = idNum == null ? null : idNum.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getNativePlace() {
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace == null ? null : nativePlace.trim();
    }

    public String getProvincesId() {
        return provincesId;
    }

    public void setProvincesId(String provincesId) {
        this.provincesId = provincesId == null ? null : provincesId.trim();
    }

    public String getCitiesId() {
        return citiesId;
    }

    public void setCitiesId(String citiesId) {
        this.citiesId = citiesId == null ? null : citiesId.trim();
    }

    public String getAreasId() {
        return areasId;
    }

    public void setAreasId(String areasId) {
        this.areasId = areasId == null ? null : areasId.trim();
    }

    public String getDetailAddr() {
        return detailAddr;
    }

    public void setDetailAddr(String detailAddr) {
        this.detailAddr = detailAddr == null ? null : detailAddr.trim();
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
}